using System.Collections.Generic;

namespace Kayac.Statistics
{
	public static class GradientDescent
	{
		private class SearchState
		{
			public int bestI0;

			public int bestI1;

			public double bestY;

			public int currentIterationIndex;

			public HashSet<(int i0, int i1)> history;
		}

		public static void Optimize(out double x0, out double x1, IFunction2 func, double initialX0, double initialX1, int maxOuterIteration, int maxInnerIteration, double epsilon, double speed, double broadSearchStep0, double broadSearchStep1, int broadSearchIterations, double broadSearchCutThresholdMultiplier)
		{
			x0 = default(double);
			x1 = default(double);
		}

		private static void SearchBroadPhase(out double x0, out double x1, IFunction2 func, double initialX0, double initialX1, double broadSearchStep0, double broadSearchStep1, int broadSearchIterations, double broadSearchCutThresholdMultiplier)
		{
			x0 = default(double);
			x1 = default(double);
		}

		private static void SearchBroadPhaseSub(SearchState state, IFunction2 func, int i0, int i1, double initialX0, double initialX1, double broadSearchStep0, double broadSearchStep1, int broadSearchIterations, double broadSearchCutThresholdMultiplier, int depth)
		{
		}
	}
}
